<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    Object.prototype.abc = "Object的abc"
    
    function Fn(){}
    Fn.prototype.show = function(){ "show" }


    function Fun(){}


    const fn = new Fn();
    const fun = new Fun();

    console.log( fn.__proto__ === Fn.prototype );
    console.log( fn.__proto__ );
    console.log( Fn.prototype );

    console.log(fn);
    console.log(fn.show);
    console.log(Fn.prototype.show);
    console.log(fn.show === Fn.prototype.show);
    
    console.log(fn.abc);
    console.log(fn.qwe);

    console.log( Fn.prototype.constructor === Fn );
    console.log( fn.constructor === Fn );
    console.log( fn.constructor === Fn.prototype.constructor );
    
    console.log("========")

    // 运算符：instanceof
    console.log( fn instanceof Fn );
    console.log( fun instanceof Fun );
    console.log( fn instanceof Object );
    console.log( fun instanceof Object );
    console.log( Fn instanceof Object );
    console.log( Fun instanceof Object );

    console.log( fn instanceof Fun );

    console.log("========");
    
    // 区分数组，对象，null
    console.log( [] instanceof Array );

    console.log( {} instanceof Array );
    console.log( null instanceof Array );

    console.log( {} === {} );
    console.log( null === null );

    console.log("========");

    // 原型方法：
    console.log( Fn.prototype.isPrototypeOf(fn) );
    console.log( Fun.prototype.isPrototypeOf(fun) );
    console.log( Object.prototype.isPrototypeOf(Fn) );
    console.log( Object.prototype.isPrototypeOf(Fun) );
    console.log( Object.prototype.isPrototypeOf(fn) );
    console.log( Object.prototype.isPrototypeOf(fun) );

    console.log( Fun.prototype.isPrototypeOf(fn) );

    // ========

    // Fn.prototype.init = function(){}
    // Fn.prototype.hello = "hello"
    // fn.anme = "admin";
    // fn.show = function(){}
    // console.log(fn);

    // console.log( [] )
    // 伪数组：只有索引和长度，没有数组的方法
    // 原型指针没有指向Array.prototype

    // console.log( document.querySelectorAll(".box") )
    // console.log( document.getElementsByClassName("box") )
    // 错
    // ali.push(li)

    // 伪数组转真数组
        








</script>
</html>